<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>修改密码</title>
<link type="text/css" href="__CSS__/wild.css?v={$src_version}" rel="stylesheet"/>
<script type="text/javascript" src="__PUBLIC_JS__/zepto.min.js" ></script>
<script type="text/javascript" src="__PUBLIC_JS__/fastclick.js" ></script>
<script type="text/javascript" src="__PUBLIC__/layer_mobile/layer.js" ></script>   
<script type="text/javascript" src="__PUBLIC_JS__/ming.js?v={$src_version}" ></script>
</head> 
<body>
 <div class="reback"><img src="__IMG__/reback.svg" onclick="javascript:history.back(-1);"></div>
 <img class="index_img" src="__IMG__/index_img.png" alt="封面图">
    <p class="page-title">更改密码</p>
    <form class="info-form" method="post" action="?" id="frm">
        <div class="input-item pwd change-pwd">
            <span class="input-before">原始密码</span>
            <input class="input oldpwd-input" name="opwd" type="password"  id="opwd" value="" placeholder="请输入账号原始密码">
        </div>
        <div class="input-item pwd change-pwd">
            <span class="input-before">新密码</span>
            <input class="input newpwd-input" name="npwd" type="password" id="npwd" value="" placeholder="请输入您想要设置的新密码">
        </div>
        <div class="input-item pwd change-pwd">
            <span class="input-before">确认密码</span>
            <input class="input newpwd-input" name="okpwd" type="password"  id="okpwd" value="" placeholder="请再次输入您想要设置的新密码">
        </div>
        <div class="btn-group">
            <div class="btn btn-green"><a href="javascript:;" id="sbt">确定</a></div>
        </div>
        <input type="hidden" value="add" name="act" />
    </form>
 <script type="text/javascript">
  $(function(){

     FastClick.attach(document.body);// 解决 延迟300ms 
 
     $('#sbt').click(function(){
 
		var opwd=$.trim($('#opwd').val());
		
		var npwd=$.trim($('#npwd').val());
		
		var okpwd=$.trim($('#okpwd').val());
		
		
	 
	  if(opwd==''){layer.open({ content:'请输入原密码' ,skin: 'msg' ,time: 2  });return ;} 
	  if(npwd==''){layer.open({ content:'请输入新密码' ,skin: 'msg' ,time: 2  });return ;} 	
      if(okpwd==''){layer.open({ content:'请输入确认密码' ,skin: 'msg' ,time: 2  });return ;} 
	  if(okpwd!=npwd){layer.open({ content:'两次输入的密码不一致' ,skin: 'msg' ,time: 2  });return ;} 	
	   $.ajax({

		 type:'post',

		 url:'{:U("User/upwd")}',

		 data:$('#frm').serialize(),  

		 dataType:'json',

		 success:function(res){

			 
			 layer.open({ content:res.msg ,skin: 'msg' ,time: 2  });
			 
			  res.code=='1'?setTimeout("goURL('"+res.url+"')",500):'';   return ;
			   
            }

	    });

	   });	   
   });
 
  </script>
 
  
</body>
</html>